@extends('module::BlogThemeLightA.View.pc.frameCustom')

@section('pageTitle'){{$pageTitle}}@endsection
@section('pageKeywords'){{$pageKeywords}}@endsection
@section('pageDescription'){{$pageDescription}}@endsection

@section('bodyContent')
    <div class="banner">
        <div class="container-xxl">
            <div class="banner-body">
                <div id="slide-banner" class="carousel slide carousel-fade">

                    <div class="carousel-inner">
                        @foreach(\MBanner::allImage('Blog') as $bannerIndex=>$banner)
                            <div class="carousel-item {{$bannerIndex==0?'active':''}}">
                                <a href="{{ $banner['link'] }}" class="links"></a>
                                <img src="{{ $banner['image'] }}" class="sm-none">
                                <img src="{{ $banner['image'] }}" class="d-none sm-block">
                            </div>
                        @endforeach
                    </div>
                    <ul class="control">
                        <li><a href="JavaScript:;" role="button" data-bs-target="#slide-banner"
                               data-bs-slide="prev"></a>
                        </li>
                        <li><a href="JavaScript:;" role="button" data-bs-target="#slide-banner"
                               data-bs-slide="next"></a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <div class="recommend">
        <div class="container-xxl">
            <div class="recommend-body">
                @foreach(MBlog::categoryTree() as $cIndex=>$c)
                    @if($cIndex<4)
                        <div class="recommend-item">
                            <a href="{{$c['_url']}}" class="links"></a>
                            <div class="item-icon"
                                 style="background:center no-repeat url({{$c['cover']}});background-size:cover;"
                                <i style="opacity:0;"></i>
                            </div>
                            <div class="item-main">
                                <h2 class="title">
                                    {{$c['title']}}
                                    <span class="badge">GO&gt;</span>
                                </h2>
                                <p class="desc">{{$c['description']}}</p>
                            </div>
                        </div>
                    @endif
                @endforeach
            </div>
        </div>
    </div>

    <div class="list-ordinary">
        <div class="container-xxl">
            <div class="row">
                <div class="col-lg-8">
                    <div class="list-ordinary-wrap">
                        @include('module::BlogThemeLightA.View.pc.inc.blogItems',['records'=>$records])
                    </div>
                </div>
                @include('module::BlogThemeLightA.View.pc.inc.pageRightPanel')
            </div>
        </div>
    </div>
@endsection
